package com.zsh.service;

import com.zsh.config.MyProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zhangsh
 * @since 2020/12/3
 */
@Service
public class PropertyService implements InitializingBean {

	public static final Logger logger = LoggerFactory.getLogger(PropertyService.class);

	@Resource
	MyProperty property;

	@Override
	public void afterPropertiesSet() throws Exception {
		logger.warn("获取到的配置：" + property.getName());
	}

}
